{layout name="passport:layout" /}
<div class="tipbox tipbox-error mb5">
    <span class="fn-fb">小程序应答:</span>小程序应答服务是通过小程序客服系统关键字区配自动答复功能。
</div>  
<div class="titlebar button-group">
    <a href="javascript:;" url="{:url('passport.keyword/miniappText')}" class="button win"> <i class="iconfont icon-text_icon"></i>文本消息</a>
    <a href="javascript:;" url="{:url('passport.keyword/miniappLink')}" class="button win"> <i class="iconfont icon-lianjie"></i>内容链接</a>
    <a href="javascript:;" url="{:url('passport.keyword/miniappImage')}" class="button win"> <i class="iconfont icon-pic"></i>图片消息</a>
</div>
<table class="table">
    <thead><tr><th class="w80">应答类型</th><th class="w220">关键字</th><th>回复内容</th><th class="w140">更新时间</th><th class="w160">操作</th></tr></thead>
    <tbody>
        {foreach $list as $rs}
        <tr>
            <td>{switch $rs.type}{case image}<span class="badge bg-red">图片</span>{/case}
                {case link}<span class="badge bg-blue">链接</span>{/case}
                {case media}<span class="badge bg-green">图文</span>{/case}
                {default /}<span class="badge">文字</span>{/switch}</td>
            <td>{$rs.keyword}</td>
            <td>{if $rs.type == 'image'}{$rs.image}{elseif $rs.type == 'media'}{$rs.media_id}{else}{$rs.content}{/if}</td>
            <td>{$rs.update_time|date='Y-m-d H:i'}</td>
            <td class="button-group">
                <a href="javascript:;" url="{switch $rs.type}
                    {case image }{:url('passport.keyword/miniappImage',['id' => $rs.id])}{/case}
                    {case link }{:url('passport.keyword/miniappLink',['id' => $rs.id])}{/case}
                    {default /}{:url('passport.keyword/miniappText',['id' => $rs.id])}{/switch}" class="button button-blue win"><i class="iconfont icon-edit"></i>编辑</a>
                <a class="button isDel" url="{:url('passport.keyword/delete',['id' => $rs.id])}"><i class="iconfont icon-lajixiang"></i>删除</a>
            </td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$list|raw}
<script type="text/javascript">
Do('base','layer',function () {
    $('.isDel').isDel();
    $(".win").win({reload:1,area:['650px','400px']});
})
</script>